import { ref, computed } from "vue";

export default function () {
  let sum = ref(0);

  //--===========
  function changeSum() {
    sum.value += 1;
  }

  let bigSum = computed(() => {
    return sum.value * 10;
  });

  //---必须向外部提供东西， 否则会出错， 没有任何东西

  return { sum, changeSum, bigSum };
}
